const Md5 = () => import("@/components/Encryption/Md5.vue");
const Base64 = () => import("@/components/Encryption/Base64.vue");
const RSA = () => import("@/components/Encryption/RSA/index.vue");
const AES = () => import("@/components/Encryption/AES/index.tsx");
const Markdown = () => import("@/components/Document/Markdown.vue");
const JsonVisual = () => import("@/components/Document/JsonVisual/index.vue");
const WebEditor = () => import("@/components/Document/WebEditor/index.vue");
const JsonToType = () => import("@/components/Document/JsonToType/index.tsx");
const TextToUnionType = () => import("@/components/Document/TextToUnionType/index.tsx");
const RegExp = () => import("@/components/Document/RegExp/index.vue");
const Diff = () => import("@/components/Document/Diff/index.vue");
const RelationCalc = () => import("@/components/Calc/RelationCalc.vue");
const UppercaseCalc = () => import("@/components/Calc/UppercaseCalc.vue");
const ImgConvertBase64 = () => import("@/components/Other/ImgConvertBase64.vue");
const JsConfuse = () => import("@/components/Other/JsConfuse.vue");
const GenerateQrcode = () => import("@/components/Other/GenerateQrcode.vue");
const DrawingBoard = () => import("@/components/Other/DrawingBoard/index.vue");
const WebVideo = () => import("@/components/Other/WebVideo/index.vue");
const OCR = () => import("@/components/System/OCR.vue");
const FileOperator = () => import("@/components/System/FileOperator/index.vue");

export const components = {
  Md5,
  Base64,
  RSA,
  AES,
  Markdown,
  JsonVisual,
  WebEditor,
  RegExp,
  Diff,
  RelationCalc,
  UppercaseCalc,
  ImgConvertBase64,
  JsConfuse,
  GenerateQrcode,
  DrawingBoard,
  WebVideo,
  OCR,
  FileOperator,
  JsonToType,
  TextToUnionType
};

// 所有的组件名称key
export type CompKey = keyof typeof components;

/** 首字母转为小写 */
type FirshLowercase<T extends string> = T extends `${infer First}${infer Rest}` ? `${Lowercase<First>}${Rest}` : T;

/** 首字母小写的组件key */
export type PathType = FirshLowercase<CompKey> | "rsa" | "aes" | "ocr";
// type PathType = FirshLowercase<CompKey> | Lowercase<CompKey>;
